package db;

import bean.User;

import java.util.*;

public final class UserMockTable {
//    private static List<User> users=new ArrayList<User>();
    private static Map<String,User> users=new LinkedHashMap<String,User>();

    private UserMockTable() {
    }

    static {
        users.put("张三1",new User("张三1","123"));
        users.put("张三2",new User("张三2","123"));
        users.put("张三3",new User("张三3","123"));
        users.put("张三4",new User("张三4","123"));
        users.put("张三5",new User("张三5","123"));
    }

    public static User getUserByName(String name){
        return users.get(name);
    }

    public static Collection<User> getAll(){
        return users.values();
    }
}
